/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "eme_fracturas")
@NamedQueries({
    @NamedQuery(name = "EmeFracturas.findAll", query = "SELECT e FROM EmeFracturas e")})
public class EmeFracturas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "efr_id")
    private Integer efrId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 128)
    @Column(name = "efr_nombre")
    private String efrNombre;
    @Column(name = "efr_puntaje")
    private Integer efrPuntaje;
    @Basic(optional = false)
    @NotNull
    @Column(name = "efr_estado")
    private int efrEstado;
    @OneToMany(mappedBy = "emeFracturas", fetch = FetchType.LAZY)
    private List<EmeTriaje> emeTriajeList;

    public EmeFracturas() {
    }

    public EmeFracturas(Integer efrId) {
        this.efrId = efrId;
    }

    public EmeFracturas(Integer efrId, String efrNombre, int efrEstado) {
        this.efrId = efrId;
        this.efrNombre = efrNombre;
        this.efrEstado = efrEstado;
    }

    public Integer getEfrId() {
        return efrId;
    }

    public void setEfrId(Integer efrId) {
        this.efrId = efrId;
    }

    public String getEfrNombre() {
        return efrNombre;
    }

    public void setEfrNombre(String efrNombre) {
        this.efrNombre = efrNombre;
    }

    public Integer getEfrPuntaje() {
        return efrPuntaje;
    }

    public void setEfrPuntaje(Integer efrPuntaje) {
        this.efrPuntaje = efrPuntaje;
    }

    public int getEfrEstado() {
        return efrEstado;
    }

    public void setEfrEstado(int efrEstado) {
        this.efrEstado = efrEstado;
    }

    public List<EmeTriaje> getEmeTriajeList() {
        return emeTriajeList;
    }

    public void setEmeTriajeList(List<EmeTriaje> emeTriajeList) {
        this.emeTriajeList = emeTriajeList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (efrId != null ? efrId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EmeFracturas)) {
            return false;
        }
        EmeFracturas other = (EmeFracturas) object;
        if ((this.efrId == null && other.efrId != null) || (this.efrId != null && !this.efrId.equals(other.efrId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.EmeFracturas[ efrId=" + efrId + " ]";
    }
    
}
